package cn.vshare.demo2;

import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

public class ServletInnitializer extends SpringBootServletInitializer {
    //如果需要打包发布到tomcat，需要再配置一个ServletInitializer，否则tomcat启动后会出现404。
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder applicationBuilder) {
        return applicationBuilder.sources(Demo2Application.class);
    }
}
